package com.zhangxiaofanfan;

import lombok.extern.slf4j.Slf4j;

/**
 * 多线程模拟栈帧运行情况
 *
 * @author zhangxiaofanfan
 * @date 2025-02-07 16:20:06
 */
@Slf4j
public class StackFrame {
    public static void main(String[] args) {
        new Thread(() -> method(10), "zxff-1").start();
        method(20);
    }

    public static void method(int x) {
        int y = x + 1;
        log.info("参数y: {}" , y);
        Object object = createObject();
        log.info("对象obj: {}", object);
    }

    public static Object createObject() {
        return new Object();
    }
}
